From e104219ab18f4293e3614599bc5d6a31e19a3db4 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 16 Dec 2011 13:38:06 +0100 Subject: [PATCH] tests: Relax a refcount comparison check We now test for real_refcount >= expected_refcount, because various parts of the code (a11y, selection, cursor, ...) can and do add references. --- gtk/tests/gtktreemodelrefcount.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gtk/tests/gtktreemodelrefcount.c b/gtk/tests/gtktreemodelrefcount.c index 9c91a587da..2097efb8e1 100644 --- a/gtk/tests/gtktreemodelrefcount.c +++ b/gtk/tests/gtktreemodelrefcount.c @@ -239,7 +239,12 @@ check_iter (GtkTreeModelRefCount *ref_model, } if (may_assert) - g_assert_cmpint (expected_ref_count, ==, info->ref_count); + { + if (expected_ref_count == 0) + g_assert_cmpint (expected_ref_count, ==, info->ref_count); + else + g_assert_cmpint (expected_ref_count, <=, info->ref_count); + } return expected_ref_count == info->ref_count; } -- 2.30.2